- Fixed type of variables in hypervisor.c.
- Fixed not removing a waiter from watch_queue.
- Make wait_for_watch() global accessible.
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
void do_hypervisor_callback(struct pt_regs *regs)
{
- u32 l1, l2;
- unsigned int l1i, l2i, port;
+ unsigned long l1, l2, l1i, l2i;
+ unsigned int port;
int cpu = 0;
shared_info_t *s = HYPERVISOR_shared_info;
vcpu_info_t *vcpu_info = &s->vcpu_info[cpu];
local_irq_restore(flags); \
} while (0)
+#define remove_waiter(w) do { \
+ unsigned long flags; \
+ local_irq_save(flags); \
+ remove_wait_queue(&w); \
+ local_irq_restore(flags); \
+} while (0)
+
#define wait_event(wq, condition) do{ \
unsigned long flags; \
if(condition) \
char *xenbus_read(xenbus_transaction_t xbt, const char *path, char **value);
char *xenbus_watch_path(xenbus_transaction_t xbt, const char *path);
+void wait_for_watch(void);
char* xenbus_wait_for_value(const char*,const char*);
/* Associates a value with a path. Returns a malloc'd error string on
memcpy(dest + c1, ring, c2);
}
-static inline void wait_for_watch(void)
+void wait_for_watch(void)
{
DEFINE_WAIT(w);
add_waiter(w,watch_queue);
schedule();
+ remove_waiter(w);
wake(current);
}